from sqlalchemy import DateTime
from app.config import Base
from pydantic import BaseModel
from pydantic.datetime_parse import datetime


class User(BaseModel):
    email: str
    hashed_password: str

class Transaction(BaseModel):
    id: int
    timestamp: datetime
    cost: float
    name: str
    category_id: int

    class Config:
        orm_mode = True


class TransactionCreate(BaseModel):
    cost: float
    name: str
    category_id: int

    class Config:
        orm_mode = True


class Category(BaseModel):
    name: str
